import { Service } from "cl-admin";
import BaseService from "@/service/base";
@Service("tag")
class tag extends BaseService {
	/*配置标签*/
	// 标签列表
	lists(params) {
		return this.$get("/lists", { params });
	}
	page({ size, ...args }) {
		let params = {
			...args,
			pageSize: size
		};
		return this.$get("/lists", { params }).then(res => {
			return {
				list: res.lists,
				pagination: {
					...params,
					size,
					total: res.total
				}
			};
		});
	}
	add(params) {
		return this.$post("/add", params);
	}
	edit(params) {
		return this.$post("/edit", params);
	}
	del(params) {
		return this.$post("/delete", params);
	}
}
export default tag;
